package com.tuyrt.hi.concurrent_demo.coroutines

import android.util.Log
import kotlinx.coroutines.delay

/**
 * author: Administrator on 2021/6/18.
 * desc:
 */
object CoroutineScene2 {
    private const val TAG = "CoroutineScene2"

    suspend fun request1(): String {
        val request2 = request2()
        return "result from request1 = " + request2
    }

    suspend fun request2(): String {
        delay(2 * 1000)
        Log.e(TAG, "request2 completed ")
        return "result from request2 "
    }
}